# -*- coding: utf-8 -*-
'''
# @Datetime: 2018/12/23
# @author: Zhang Yafei
'''
'''
class Base(object):
    def func(self):
        print('Base_func')


class Foo(Base):
    def func(self):
        # 方式一：根据mro的顺序执行方法
        # super(Foo, self).func()
        # 方式二：主动执行Base类的方法
        # Base.func(self)
        print('Foo_func')


obj = Foo()
obj.func()
'''


############################### super和执行父类的方法的区别  ###################
class Base(object):
    def func(self):
        super(Base, self).func()
        print('Base_func')


class Bar(object):
    def func(self):
        print('Bar_func')


class Foo(Base, Bar):
    pass


obj = Foo()
obj.func()
print(Foo.__mro__)

# obj = Base()
print(Base.__mro__)
# obj.func()